package com.ruoyi.project.system.recycler.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.recycler.mapper.RecyclerMapper;
import com.ruoyi.project.system.recycler.domain.Recycler;
import com.ruoyi.project.system.recycler.service.IRecyclerService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 回收员管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
@Service
public class RecyclerServiceImpl implements IRecyclerService 
{
    @Autowired
    private RecyclerMapper recyclerMapper;

    /**
     * 查询回收员管理
     * 
     * @param recyclerId 回收员管理主键
     * @return 回收员管理
     */
    @Override
    public Recycler selectRecyclerByRecyclerId(Long recyclerId)
    {
        return recyclerMapper.selectRecyclerByRecyclerId(recyclerId);
    }

    /**
     * 查询回收员管理列表
     * 
     * @param recycler 回收员管理
     * @return 回收员管理
     */
    @Override
    public List<Recycler> selectRecyclerList(Recycler recycler)
    {
        return recyclerMapper.selectRecyclerList(recycler);
    }

    /**
     * 新增回收员管理
     * 
     * @param recycler 回收员管理
     * @return 结果
     */
    @Override
    public int insertRecycler(Recycler recycler)
    {
        recycler.setCreateTime(DateUtils.getNowDate());
        return recyclerMapper.insertRecycler(recycler);
    }

    /**
     * 修改回收员管理
     * 
     * @param recycler 回收员管理
     * @return 结果
     */
    @Override
    public int updateRecycler(Recycler recycler)
    {
        return recyclerMapper.updateRecycler(recycler);
    }

    /**
     * 批量删除回收员管理
     * 
     * @param recyclerIds 需要删除的回收员管理主键
     * @return 结果
     */
    @Override
    public int deleteRecyclerByRecyclerIds(String recyclerIds)
    {
        return recyclerMapper.deleteRecyclerByRecyclerIds(Convert.toStrArray(recyclerIds));
    }

    /**
     * 删除回收员管理信息
     * 
     * @param recyclerId 回收员管理主键
     * @return 结果
     */
    @Override
    public int deleteRecyclerByRecyclerId(Long recyclerId)
    {
        return recyclerMapper.deleteRecyclerByRecyclerId(recyclerId);
    }
}
